package com.shujia.day16.sjms.factory;

import com.shujia.day16.sjms.easyfactory.Animal;

public class Operator {
    public static void main(String[] args) {

        DogFactory dogFactory = new DogFactory();
        // 创建Dog对象
        Animal dog1 = dogFactory.getAnimal();
        Animal dog2 = dogFactory.getAnimal();

        dog1.sleep();

        CatFactory catFactory = new CatFactory();
        Animal cat1 = catFactory.getAnimal();
        Animal cat2 = catFactory.getAnimal();

        cat1.sleep();

    }
}
